/**
 * Created by Administrator on 2017/6/27 0027.
 */
import Relay from "react-relay";

export default class FindMaterielBillMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findMaterielBill }`;
    }

    getVariables() {
        return {
            argsInput: {
                orderId:this.props.orderId,
                materielType:this.props.materielType,
                styleNo:this.props.styleNo,
                purchStatus:this.props.purchStatus,
                bomIds:this.props.bomIds,
                pageNum:this.props.pageNum,
                pageSize:this.props.pageSize,
                isSearchAllStyleByOrder:this.props.isSearchAllStyleByOrder,

            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findMaterielBillPayload {
            findMaterielBill {
                value
                errorCode
                userId
                totalResult
                orderGoodsList{
                    styleNo
                    gid
                    orderId
                    quantity
                }
                materielBillList{
                    createTime
                    size
                    prickle
                    goodsId
                    orderId
                    needCount
                    materielType
                    color
                    quantity
                    purchStatus
                    bomId
                    orderType
                    dosage
                    partDesc
                    productName
                    consume
                    updateTime
                    description
                    styleNo
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
             fragment on findMaterielBillPayload {
                    findMaterielBill {
                        value
                        errorCode
                        userId
                        totalResult
                        orderGoodsList{
                            styleNo
                            gid
                            orderId
                            quantity
                        }
                        materielBillList{
                            createTime
                            size
                            prickle
                            goodsId
                            orderId
                            needCount
                            materielType
                            color
                            quantity
                            purchStatus
                            bomId
                            orderType
                            dosage
                            partDesc
                            productName
                            consume
                            updateTime
                            description
                            styleNo
                        }
                    }
             }
            `]
        }];
    }

}